<template>
  <div class="news">
    <el-container>
      <el-tabs type="border-card" class="demo-tabs" stretch>
        <el-tab-pane>
          <template #label>
            <el-icon><Fold /></el-icon>
          </template>
          <Newsmain :datalist="data" />
        </el-tab-pane>
        <el-tab-pane>
          <template #label>
            <el-icon><UserFilled /></el-icon>
          </template>
          <ZUserFilled />
        </el-tab-pane>
        <el-tab-pane>
          <template #label>
            <el-icon><StarFilled /></el-icon>
          </template>
          <ZStarFilled />
        </el-tab-pane>
      </el-tabs>
    </el-container>
    <div class="news-l-r">
      <div>
        <el-icon><CirclePlusFilled /></el-icon>
        <span>设置</span>
      </div>
      <div>查看全部通知</div>
    </div>
  </div>
</template>

<script >
import { defineComponent, computed, toRaw } from "vue";
import Newsmain from "./cpns/news-main.vue";
import ZUserFilled from "./cpns/UserFilled.vue";
import ZStarFilled from "./cpns/StarFilled.vue";

import { useStore } from "vuex";

export default defineComponent({
  components: { Newsmain, ZUserFilled, ZStarFilled },
  setup() {
    const stoer = useStore();
    const nv = ["Fold", "UserFilled", "StarFilled"];
    // stoer.commit("dead/getdatalist", "参数");
    const data = toRaw(computed(() => stoer.state.head.datalist).value);
    const cutclick = (j) => {
      console.log(j);
    };
    console.log(data);
    return { data, nv, cutclick };
  },
});
</script>

<style scoped lang="less" >
.news {
  .news-header {
    padding: 0;
    height: 48px;
    line-height: 48px;
    display: flex;
    border-bottom: 1px solid #ebebeb;
    cursor: pointer;

    > div {
      width: 103px;
      text-align: center;
      font-size: 25px;
      position: relative;
    }
    // 小竖杠
    .CreditCard::after {
      content: "";
      height: 20px;
      border: 1px solid #ebebeb;
      position: absolute;
      right: 0px;
      top: 12px;
    }
    .UserFilled::after {
      content: "";
      height: 20px;
      border: 1px solid #ebebeb;
      position: absolute;
      right: 0px;
      top: 12px;
    }
  }
  .news-l-r {
    width: 277px;
    padding: 15px 15px 15px 30px;
    display: flex;
    //左右两边
    justify-content: space-between;
    text-align: center;
    position: relative;
    font-size: 17px;
    /deep/.el-icon {
      position: absolute;
      top: 17px;
      left: 10px;
      font-size: 19px;
      > svg {
        vertical-align: -0.15em;
      }
    }
  }
  /deep/.el-main {
    padding: 0;
  }
}
/deep/ .el-tabs__header {
  .el-tabs__item {
    font-size: 25px;
  }
}
</style>
